package cpr.command;

import cpr.DefaultCommandHandler;
import cpr.data.SplitCluster;
import cpr.data.WorksetItem;

public class CmdAdd extends DefaultCommandHandler {
	public CmdAdd() {
		super("ws-add");
	}
	public void execute(String[] params) throws Exception {
			int clusterNumber = Integer.parseInt(getParameter(params, 1))-1;
			SplitCluster c = getCommandContext().getClusterItem(getCommandContext().getContext().getCurrentWorksetContext().getClusterSet(),clusterNumber);	
			getCommandContext().getContext().getCurrentWorksetContext().addWorkSetItem(new WorksetItem(c));
			getCommandContext().execute("ws");
			
			
	}
}